package com.mc.service.impl;

import com.mc.bean.MJ;
import com.mc.dao.Impl.MJDaoImpl;
import com.mc.dao.MJDao;
import com.mc.service.MJService;

import java.util.List;

/**
 * 赛事评委关系实体类数据业务业务逻辑实现类
 * @author fyp
 */
public class MJServiceImpl implements MJService {
    MJDao mjDao=new MJDaoImpl();

    @Override
    public List<MJ> findByMJCode(int mjcode) {
        return mjDao.findByMJCode(mjcode);
    }

    @Override
    public List<MJ> findByMid(int mid) {
        return mjDao.findByMid(mid);
    }

    @Override
    public List<MJ> findByJuryId(int juryid) {
        return mjDao.findByJuryId(juryid);
    }

    @Override
    public boolean add(MJ mj) {
        return mjDao.add(mj)>0?true:false;
    }

    @Override
    public boolean delete(int mjcode) {
        return mjDao.delete(mjcode)>0?true:false;
    }

    @Override
    public boolean update(MJ mj) {
        return mjDao.update(mj)>0?true:false;
    }
}
